<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目里程碑设置</title>
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--公用样式-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/comment.css">
    <!--页面样式-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/style.css">
    <link rel="stylesheet" href="${re.contextPath}/plugin/common/css/extended.css">
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"></script>
    <script type="text/javascript" src="${re.contextPath}/plugin/jquery/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="${re.contextPath}/plugin/common/js/comment.js"></script>
</head>
<body class="whitebg">
<div class="myDataCentere mydataCentere-small" style="height: 330px">
    <ul class="clearfix">
        <li class="clearfix">
            <label class="fl">项目里程</label>
            <select name="LCList" id="LCList">
<#--                <option value="">选择阶段</option>-->
                <#list LCList as vo>
                    <#if "${milepost.milepostNo}" =="${vo.badtCode}">
                        <option value="${vo.badtCode}" selected="true">${vo.badtName}</option>
                    <#else>
                        <option value="${vo.badtCode}">${vo.badtName}</option>
                    </#if>
                </#list>
                <input type="hidden" name="id" id="id" value="${milepost.id}">
                <input type="hidden" name="stageId" id="stageId" value="${milepost.stageId}">
            </select>
        </li>
    </ul>


    <ul class="clearfix">
        <li class="clearfix">
            <label class="fl">占比</label>
            <input name="milepostZb" id="milepostZb" type="number" min="1" max="100" step="0.01" value="${milepost.milepostZb}">
        </li>
    </ul>


    <ul class="clearfix">
        <li class="clearfix">
            <label class="fl">顺序</label>
            <input name="orderNum" id="orderNum" type="number" min="1" step="1" value="${milepost.orderNum}">
        </li>
    </ul>


    <ul class="clearfix">
        <li class="clearfix">
            <label class="fl">英文简称</label>
            <input name="milepostEnjc" id="milepostEnjc" value="${milepost.milepostEnjc}">
        </li>
    </ul>
</div>

<div style="background-color: white;background-color: white;padding: 15px;text-align: center;position: fixed;bottom: 1px;width: 100%;">
    <button class="layui-btn layui-btn-sm" lay-filter="submitStage" lay-submit type="button">更新</button>
    <button class="layui-btn layui-btn-primary layui-btn-sm" type="button" id="close">取消</button>
</div>

<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script>
    layui.use(['form','layer'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;

        $('#close').click(function(){
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        });
        //监听提交

        form.on('submit(submitStage)', function(data){
            var milepostNo = $('#LCList').val();
            var id = $('#id').val();
            var orderNum = $('#orderNum').val();
            var stageId = $('#stageId').val();
            var milepostEnjc = $('#milepostEnjc').val();
            var milepostZb = $('#milepostZb').val();
            var json = {
                milepostNo: milepostNo,
                id:id,
                orderNum:orderNum,
                stageId:stageId,
                milepostEnjc:milepostEnjc,
                milepostZb:milepostZb
            }
            layerAjax('/adminManager/jc/milepostManagerJc/updateMilepostValue',json, '',
                function (d) {
                    if (d.flag == true) {
                        layer.msg(d.msg, {icon: 1});
                        layui.table.reload('milepostList');
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index);
                    } else {
                        layer.msg(d.msg, {icon: 2});
                    }
                });
            return false;
        });
    });
</script>
</body>
</html>